﻿
namespace GNUGo.Net.CLI.CliControls {
    public class CliLabel : CliControl {
        private string _text;

        public CliLabel() {
            _text = "";
            Width = 20;
            Height = 1;
        }

        public string Text {
            get { return _text; }
            set {
                if (_text != value) {
                    _text = value ?? "";
                    Invalidate();
                }
            }
        }

        protected override void OnPaint(object sender, PaintEventArgs args) {
            base.OnPaint(sender, args);
            args.Graphics.DrawString(Text, Forecolor, Backcolor, 0, 0);
        }
    }
}
